home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 1
/
BUGCD1996_0708.ISO
/
pc
/
util
/
minilin
/
minilin.exe
/
VAR
/
LIB
/
SETUP
/
SETCONFI.{__
< prev
Wrap
Text File
|
1994-05-03
|
7KB
|
216 lines
#!/bin/sh
T_PX="`cat /tmp/SeTT_PX`"
ROOT_DEVICE="`cat /tmp/SeTrootdev`"
if [ ! -d $T_PX/bin -a ! -d $T_PX/etc ]; then # if there no Linux here, exit
exit
fi
dialog --title "CONFIGURE YOUR SYSTEM?" --yesno "Now it's time to configure \
your Linux system. If this is a new system, you must configure it now or it \
will not boot correctly. Otherwise, you can back out to the main menu if \
you're sure you want to skip this step. If you've installed a new kernel \
image, it's important to reconfigure your system so that you can \
create a bootdisk that uses the new kernel. Do you want to \
move on to \
the CONFIGURE option?" 13 60
if [ $? = 1 -o $? = 255 ]; then
exit
fi
dialog --title "MAKE BOOT DISK?" --yesno "In order to boot Linux, you will \
have to use a boot disk, since the Linux boot loader is not compatible with \
the UMSDOS filesystem. Please insert the blank formatted disk that you have \
ready for this purpose, and answer YES. If you have forgotten to prepare one, \
answer NO, and you can make one later by running setup from your hard \
drive and choosing CONFIGURE; however, you'll have to use the bootkernel to \
start your system until then. Make boot disk?" \
13 60
if [ $? = 0 ]; then
dialog --title "BOOT DISK CREATION" --yesno \
"Now put a formatted floppy in your boot drive. This will be made into your \
Linux boot disk. \
Any data on the target disk will be destroyed. \
"YES" creates the disk, "NO" aborts." 9 50
if [ $? = 0 ]; then
dialog --title "CREATING DISK" --infobox "Creating boot disk from 'vmlinuz'..." 5 50
KERNEL="/vmlinuz"
# echo " - writing kernel to disk: (dd if=$T_PX$KERNEL of=/dev/fd0)"
dd if=$T_PX$KERNEL of=/dev/fd0 2> /dev/null
# echo "Configuring boot disk..."
# echo -n " - boot device: "
rdev /dev/fd0 $ROOT_DEVICE
# echo "(rdev /dev/fd0 $ROOT_DEVICE)"
# echo -n " - video mode: "
rdev -v /dev/fd0 -1
# echo "(rdev -v /dev/fd0 -1)"
# echo -n " - mount root read-write for umsdos: "
# echo "(rdev -R /dev/fd0 0)"
rdev -R /dev/fd0 0
sync
# echo "Boot disk created."
else
dialog --title "SKIPPED BOOT DISK CREATION" --msgbox "Boot disk creation \
skipped. You'll have to use the bootkernel to start your system with the \
command: mount `cat /tmp/SeTrootdev`" 7 60
fi
else
dialog --title "SKIPPED BOOT DISK CREATION" --msgbox "Boot disk creation \
skipped. You'll have to use the bootkernel to start your system with the \
command: mount `cat /tmp/SeTrootdev`" 7 60
fi
dialog --title "MODEM CONFIGURATION" --yesno \
"\n\
This part of the configuration process will create a link in /dev\n\
from your callout device (cua0, cua1, cua2, cua3) to /dev/modem.\n\
You can change this link later if you put your modem on a different\n\
port.\n\n\
Would you like to set up your modem?\n" 12 73
if [ $? = 0 ]; then
dialog --title "SELECT CALLOUT DEVICE" \
--menu "Please select the callout device which you would like to use \
for your modem:" 12 60 4 \
"cua0" "com1: under DOS" \
"cua1" "com2: under DOS" \
"cua2" "com3: under DOS" \
"cua3" "com4: under DOS" 2> /tmp/callout
if [ $? = 1 ]; then
rm -f /tmp/callout
else
MODEM_DEVICE="`cat /tmp/callout`"
rm -f /tmp/callout
(cd $T_PX/dev; ln -sf $MODEM_DEVICE modem)
fi
fi
dialog --title "MOUSE CONFIGURATION" \
--yesno "\n\
This part of the configuration process will create a link in /dev\n\
from your mouse device to /dev/mouse. You can change this link\n\
later if the setting chosen does not work, or if you switch to a\n\
different type of mouse.\n\n\
Would you like to set up your mouse?" 12 70
if [ $? = 0 ]; then
dialog --title "SELECT MOUSE TYPE" --menu "These mouse types are supported:" 14 60 6 \
"1" "Microsoft compatible serial mouse" \
"2" "C&T 82C710 or PS/2 style mouse (Auxiliary port)" \
"3" "Logitech Bus Mouse" \
"4" "ATI XL Bus Mouse" \
"5" "Microsoft Bus Mouse" \
"6" "Mouse Systems serial mouse" 2> /tmp/mtype
if [ $? = 1 ]; then
rm -f /tmp/mtype
fi
if [ -f /tmp/mtype ]; then
MOUSE_TYPE="`cat /tmp/mtype`"
else
unset MOUSE_TYPE
fi
rm -f /tmp/mtype
if [ "$MOUSE_TYPE" = "1" -o "$MOUSE_TYPE" = "6" ]; then
dialog --title "SELECT SERIAL PORT" --menu "Your mouse requires a serial port. Which one would you \
like to use?" 13 60 4 \
"ttyS0" "com1: under DOS" \
"ttyS1" "com2: under DOS" \
"ttyS2" "com3: under DOS" \
"ttyS3" "com4: under DOS" 2> /tmp/mport
if [ $? = 1 ]; then
rm -f /tmp/mport
fi
if [ -f /tmp/mport ]; then
MOUSE_DEVICE="`cat /tmp/mport`"
else
unset MOUSE_DEVICE
fi
rm -f /tmp/mport
if [ "$MOUSE_TYPE" = "1" ]; then
MTYPE="ms"
else
MTYPE="msc"
fi
(cd $T_PX/dev; ln -sf $MOUSE_DEVICE mouse)
elif [ "$MOUSE_TYPE" = "2" ]; then
(cd $T_PX/dev; ln -sf ps2aux mouse)
MTYPE="ps2"
elif [ "$MOUSE_TYPE" = "3" ]; then
(cd $T_PX/dev; ln -sf bmouselogitec mouse)
MTYPE="logi"
elif [ "$MOUSE_TYPE" = "4" ]; then
(cd $T_PX/dev; ln -sf bmouseatixl mouse)
MTYPE="bm"
elif [ "$MOUSE_TYPE" = "5" ]; then
(cd $T_PX/dev; ln -sf bmousems mouse)
MTYPE="bm"
fi
fi
export MTYPE
( cd $T_PX ; chmod 755 ./ )
( cd $T_PX ; chmod 755 ./var )
if [ -d $T_PX/usr/src/linux ]; then
chmod 755 $T_PX/usr/src/linux
fi
if [ ! -d $T_PX/proc ]; then
mkdir $T_PX/proc
chown root.root $T_PX/proc
fi
# This is now done by gcc.tgz
#if [ -d $T_PX/usr/lib/gcc-lib/i486-linux ]; then # add the newest one
# ( cd $T_PX/lib; ln -sf ../usr/lib/gcc-lib/i486-linux/?.?.?/cpp cpp )
#fi
if [ ! -d $T_PX/var/spool/uucp ]; then
mkdir -p $T_PX/var/spool/uucp
fi
chown uucp.uucp $T_PX/var/spool/uucp
chmod 1777 $T_PX/var/spool/uucp
if [ ! -d $T_PX/var/spool/uucppublic ]; then
mkdir -p $T_PX/var/spool/uucppublic
fi
chown uucp.uucp $T_PX/var/spool/uucppublic
chmod 1777 $T_PX/var/spool/uucppublic
chmod 1777 $T_PX/tmp
if [ ! -d $T_PX/var/spool/mail ]; then
mkdir -p $T_PX/var/spool/mail
chmod 755 $T_PX/var/spool
chown root.mail $T_PX/var/spool/mail
chmod 775 $T_PX/var/spool/mail
fi
# Post installation and setup scripts added by packages.
if [ -d $T_PX/var/adm/setup ]; then
for INSTALL_SCRIPTS in $T_PX/var/adm/setup/setup.*
do
SCRIPT=`basename $INSTALL_SCRIPTS`
# Here, we call each script in /var/adm/setup. Two arguments are provided:
# 1 -- the target prefix (normally /, but /mnt from the bootdisk)
# 2 -- the name of the root device.
if [ ! "$SCRIPT" = "setup.liloconfig" ]; then
( cd $T_PX ; sh var/adm/setup/$SCRIPT $T_PX $ROOT_DEVICE )
fi
if echo $SCRIPT | fgrep onlyonce 1> /dev/null 2> /dev/null; then # only run after first install
if [ ! -d $T_PX/var/adm/setup/install ]; then
mkdir $T_PX/var/adm/setup/install
fi
mv $INSTALL_SCRIPTS $T_PX/var/adm/setup/install
fi
done
fi
# Load keyboard map (if any) when booting
if [ -r /tmp/SeTkeymap ]; then
MAPNAME="`cat /tmp/SeTkeymap`"
if fgrep "sh /etc/rc.d/rc.keymap" $T_PX/etc/rc.d/rc.local 1> /dev/null 2> /dev/null ; then
echo >> /dev/null # ?
else
echo "# Load custom keyboard map" >> $T_PX/etc/rc.d/rc.local
echo "sh /etc/rc.d/rc.keymap" >> $T_PX/etc/rc.d/rc.local
fi
mkdir -p $T_PX/usr/lib/kbd/keytables
if [ ! -r $T_PX/usr/lib/kbd/keytables/$MAPNAME ]; then
cp /tmp/$MAPNAME $T_PX/usr/lib/kbd/keytables
chmod 755 $T_PX/usr/lib/kbd/keytables
fi
echo "#!/bin/sh" > $T_PX/etc/rc.d/rc.keymap
echo "echo 'Loading keyboard map \"$MAPNAME\"...'" >> $T_PX/etc/rc.d/rc.keymap
echo "/usr/bin/loadkeys /usr/lib/kbd/keytables/$MAPNAME" >> $T_PX/etc/rc.d/rc.keymap
chmod 755 $T_PX/etc/rc.d/rc.keymap
fi